<template>
  <div class='jdal'>
    <div class="banner">
      <img :src = 'bannerImg'>
    </div>
    <div class="content">
      <ul class="tab">
        <li v-for='(item,index) in tab' @click='active(item, index)' :key='index'>
          <span :class='index==activeSty?"activeSty":""'>{{item.title}}</span>
        </li>
      </ul>
      <div class="jdal-content">
        <h2>行业应用案例</h2>
        <h3>Industry Application Case</h3>
      </div>
      <ul class="jdal-list">
        <li v-for='(item , index ) in jdal' :key='index'>
          <div class="list">
              <img :src='item.img'>
              <p class="jdal-text">{{item.text}}</p>
              <div class="bottom-line"></div>
              <div class="mask">
                <h2>{{item.title}}</h2>
                <p>{{item.code}}</p>
              </div>
          </div>
        </li>
      </ul>
      <el-pagination background layout="prev, pager, next" :page-size="6" :total="54"></el-pagination>
    </div>
  </div>
</template>
<script>
export default {
  name: 'Jdal',
  data () {
    return {
      bannerImg: require('../assets/images/jdalBanner.png'),
      activeSty: 0,
      tab: [
        {
          title: '行业应用案例',
          code: 'hyyyal'
        },
        {
          title: '产品应用案例',
          code: 'cpyyal'
        }
      ],
      jdal: [
        {
          title: '数据结构系统',
          code: 'Ecological Station Display Platform',
          img: require('../assets/images/jdal01.png'),
          text: '通过平台数据展示可以清晰了解到各地方的生态环境指数。快速制定相对应的手段来对应各个地区的情况进行有效的改善，使之整个环境的环境度提高，逐渐得到改善。通过平台数据展示可以清晰了解到各地方的生态环境指数。快速制定相对应的手段来对应各个地区的情况进行有效的改善，使之整个环境的环境度提高，逐渐得到改善。'
        },
        {
          title: '数据结构系统',
          code: 'Ecological Station Display Platform',
          img: require('../assets/images/jdal02.png'),
          text: '通过平台数据展示可以清晰了解到各地方的生态环境指数。快速制定相对应的手段来对应各个地区的情况进行有效的改善，使之整个环境的环境度提高，逐渐得到改善。'
        },
        {
          title: '数据结构系统',
          code: 'Ecological Station Display Platform',
          img: require('../assets/images/jdal03.png'),
          text: '通过平台数据展示可以清晰了解到各地方的生态环境指数。快速制定相对应的手段来对应各个地区的情况进行有效的改善，使之整个环境的环境度提高，逐渐得到改善。'
        },
        {
          title: '数据结构系统',
          code: 'Ecological Station Display Platform',
          img: require('../assets/images/jdal01.png'),
          text: '通过平台数据展示可以清晰了解到各地方的生态环境指数。快速制定相对应的手段来对应各个地区的情况进行有效的改善，使之整个环境的环境度提高，逐渐得到改善。'
        },
        {
          title: '数据结构系统',
          code: 'Ecological Station Display Platform',
          img: require('../assets/images/jdal02.png'),
          text: '通过平台数据展示可以清晰了解到各地方的生态环境指数。快速制定相对应的手段来对应各个地区的情况进行有效的改善，使之整个环境的环境度提高，逐渐得到改善。'
        },
        {
          title: '数据结构系统',
          code: 'Ecological Station Display Platform',
          img: require('../assets/images/jdal03.png'),
          text: '通过平台数据展示可以清晰了解到各地方的生态环境指数。快速制定相对应的手段来对应各个地区的情况进行有效的改善，使之整个环境的环境度提高，逐渐得到改善。'
        }
      ]
    }
  },
  methods: {
    active (item, index) {
      this.activeSty = index
    }
  }
}
</script>
<style lang="less" scoped>
.jdal{
  .banner{
    width: 100%;
    min-width: 1200px;
    img{
      width: 100%;
    }
  }
  .content{
    width: 1200px;
    margin: 0 auto;
    .tab{
      overflow: hidden;;
      width:320px;
      margin: 70px auto;
      text-align: center;
      li{
        float: left;
        margin-right: 20px;
        &:last-of-type{
          margin-right: 0;
        }
        cursor: pointer;
        span{
          display: block;
          font-size: 20px;
          font-weight: Medium;
          color: #666666;
          padding: 10px 15px;
          &.activeSty{
            background:linear-gradient(0deg,rgba(32,166,196,1),rgba(126,213,233,1));
            box-shadow:0px 2px 13px 2px rgba(15,87,104,0.06);
            border-radius:20px;
            color: #ffffff;
          }
        }
      }
    }
    .jdal-content{
      h2{
        text-align: center;
        font-size:52px;
        font-family:Lato-Light;
        font-weight:300;
        color:rgba(51,51,51,1);
        line-height:52px;
      }
      h3{
        text-align: center;
        font-size:24px;
        font-family:PingFang-SC-Medium;
        font-weight:500;
        color:rgba(153,153,153,1);
        line-height:60px;
        // letter-spacing: 80px;
        // padding-left: 80px;
      }
    }
    .jdal-list{
      height: 965px;
      border-bottom: solid #eeeeee 1px;
      li{
        float: left;
        margin-right: 24px;
        margin-top: 50px;
        border-radius: 10px;
        width:384px;
        height:392px;
        box-shadow:0px 2px 13px 2px rgba(2,10,12,0.06);
        overflow: hidden;
        cursor: pointer;
        &:nth-of-type(3n){
          margin-right: 0;
        }
        .list{
          position: relative;
          width: 384px;
          height: 392px;
          img{
            width:384px;
            height: 223px;
          }
          .jdal-text{
            padding: 30px;
            font-size: 14px;
            color: #666666;
            text-align: left;
            line-height: 25px;
            width: 322px;
            height: 70px;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 4;
            overflow: hidden;
            letter-spacing: 0px;
          }
          .bottom-line{
            position: absolute;
            left: 0;
            bottom: 0;
            z-index: 40;
            background: #ffffff;
            width:384px;
            height: 11px;
            border-radius: 0 0 10px 10px;
          }
          .mask{
            position: absolute;
            left: 0;
            top: 0;
            z-index: 50;
            width: 384px;
            height: 223px;
            background: rgba(0,0,0,0.5);
            color: #ffffff;
            text-align: center;
            h2{
              font-size: 26px;
              padding-top: 89px;
              letter-spacing: 2px;
            }
            p{
              font-size: 12px;
              font-weight: 500;
              padding-top: 10px;
            }
          }
        }
        &:hover{
          .list{
            .bottom-line{
              background: #3BB4CF;
            }
          }
          .mask{
            display: none;
          }
        }
      }
    }
    /deep/.el-pagination{
      margin: 50px auto 80px;
      width: 400px;
      .el-pager{
        li{
          background: #ffffff;
          border: 1px solid #d3d3d3;
          color: #666666;
          margin: 0 0 0 15px;
          min-width: 25px;
          min-height: 25px;
          &.active{
            background:linear-gradient(45deg,rgba(32,166,196,1),rgba(126,213,233,1));
            color: #ffffff;
            border: none;
          }
        }
      }
      .btn-next{
        margin-left: 20px;
      }
    }
  }
}
</style>
